1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, and a program.
2. Description of the Related Art
Equipments such as television receiver, VTR (Video Tape Recorder), digital camera, television camera, printer, or the like performs a correction to improve image quality on an input image and then outputs the same, and has a function of performing various image processing such as contrast adjustment (see e.g., Japanese Patent Application Laid-Open No. 2007-60580 and Japanese Patent Application Laid-Open No. 2004-266755). A technique of enhancing contrast mainly includes two types of black stretch and square gamma curve (hereinafter written as “γ curve”).
The black stretch technique is a technique of enhancing the contrast of a luminance component by drawing in black within the input image. As shown in FIG. 1, draw-in of black changes according to the blackest level or the proportion of the black portion in the input image, where black is drawn in when the proportion of the black portion is not greater than or equal to a predetermined area and is not a large area, and is weakly drawn in when the blackest level is close to 0IRE or the proportion of the black portion in the input image is a large area. The black stretch starting point (input luminance value for starting black stretch) can be arbitrarily set. FIG. 1 is a graph describing the outline of a black stretch process, where horizontal axis represents an input luminance value (X), and the vertical axis represents an output luminance value (Y).
Contrast enhancement by the square γ curve is a technique of enhancing the contrast of the input image by performing a luminance conversion process of raising the luminance or lowering the luminance using the square γ curve with respect to the input luminance value contained in an arbitrarily set interval (range of input luminance value), as shown in FIG. 2. The gain of the square γ curve may be set as a fixed value or may be dynamically set based on a total number of luminance histograms of the input image, and the like. FIG. 2 is a graph describing an outline of a luminance conversion process by the square γ curve, where horizontal axis represents the input luminance value (X), and vertical axis represents the output luminance value (Y).